/*
	Pulsar engine. Core.
	Internal include file. OS-spec thread declarations

	Copyright (C) 2013-2014 Dmitry Dolgov

	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation; either version 2 of
	the License, or (at your option) any later version.

	This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
	without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
	See the GNU General Public License for more details.
*/

namespace pl
{

/**
	Universal thread handler
*/
class ThreadHandler
{
public:
	/// Create thread handler (must be overwritten in platform spec class)
	static ThreadHandler* _createThread(Thread* ptr, int stackSize, const pl_char* name);
	/// dtor
	virtual ~ThreadHandler() {}

	/// Set ideal processor
	virtual bool setThreadProcessor(int index) = 0;
	/// Set thread priority level
	virtual bool setThreadPriority(ThreadPrior prior, int order) = 0;
	/// Check is thread workings
	virtual bool isThreadRunning() = 0;
	/// Check is thread object valid
	virtual bool isThreadValid() = 0;
};

} // namespace pl

//
// End of file 'pulsar_thread_intr.h'
//
